﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Security.Claims;
using Volo.Abp.AspNetCore.Mvc;

namespace Demo.AuthService.Controllers
{
    public class AuthServerController:AbpController
    {
        public AuthServerController()
        {

        }

        /// <summary>
        /// 删除用户（增加权限校验）
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        [HttpGet]
        [Authorize("select")]
        public ClaimsPrincipal GetUserToken()
        {
            // 1、获取用户信息
            ClaimsPrincipal claimsPrincipal = HttpContext.User;
            return claimsPrincipal;
        }
    }
}
